/**
 * Copyright 2010 Tristan Tarrant
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package net.dataforte.catwalk.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.SOURCE)
@Target(ElementType.METHOD)
public @interface ModelAttribute {
	/**
	 * Flag which determines wether the property should be "initialized" (i.e. accessed) 
	 * when it is copied from the source. This will cause lazy proxies (such as those used
	 * by ORM tools) to be initialized within an appropriate contex (e.g. JPA transaction, etc).
	 * The default behaviour is not to perform any initialization
	 */
	boolean initialize() default false;
	/**
	 * An alternative name for the property in the generated class.
	 * The default behaviour is to use the original name 
	 */
	String name() default "";
}
